const mysql = require('mysql');

// 创建数据库连接
const connection = mysql.createConnection({
    host: 'localhost',
    user: process.env.MySQL_USER,
    password: process.env.MySQL_PASSWORD,
    database: process.env.GAME_DATABASE
});

connection.connect(err => {
    if (err) throw err;
    console.log('Connected to the database!');
});

module.exports = connection;
